﻿using UnityEngine;
using System.Collections;
using System;
using GxFramework;
public class Labs : MonoBehaviour {
    AssetBundleManager abMgr = new AssetBundleManager();
    void Start()
    {
        var ab = AssetBundle.LoadFromFile("AssetBundles/android/android");
        var objs = ab.LoadAllAssets();
        var abm = objs[0] as AssetBundleManifest;
        abMgr.SetAssetBundleManifest(abm);

        abMgr.LoadAsset("models/anyingyoulang/anyingyoulang.ab", "anyingyoulang",null,OnLoaded);
    }
    void OnLoaded(AbAssetRequest req)
    {
        var obj = req.asset;
        GameObject.Instantiate(obj);
    }
    void Update()
    {
        abMgr.Update();
    }
}
